SELECT	C.COLUMN_NAME
		,C.DATA_TYPE
		,C.CHARACTER_MAXIMUM_LENGTH
		,C.IS_NULLABLE
		,PKL.CONSTRAINT_TYPE
  FROM INFORMATION_SCHEMA.COLUMNS	C
  LEFT OUTER JOIN
                  (SELECT     TC.CONSTRAINT_NAME, TC.CONSTRAINT_TYPE, KCU.COLUMN_NAME, 1 IS_PRIMARY_KEY
	  FROM	INFORMATION_SCHEMA.TABLE_CONSTRAINTS TC 
	 INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU 
	        ON	TC.CONSTRAINT_NAME = KCU.CONSTRAINT_NAME
	     AND	TC.TABLE_CATALOG  = KCU.TABLE_CATALOG
	     AND	TC.CONSTRAINT_SCHEMA = KCU.TABLE_SCHEMA 
                   WHERE	TC.TABLE_NAME = 'FooData'
	    AND	TC.CONSTRAINT_SCHEMA = 'dbo')PKL 
	       ON C.COLUMN_NAME = PKL.COLUMN_NAME
 WHERE C.TABLE_SCHEMA = 'dbo'
        AND C.TABLE_NAME = 'FooData'
